<!DOCTYPE HTML>
<html>
<head>
    <include file="Common:header_include"/>
    <title>编辑菜单</title>
</head>
<body>
<div class="pd-20">
    <form action="{:U('edit')}" method="post" class="form form-horizontal" id="form">
        <input name="id" type="hidden" value="{$data.id}">
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red">*</span>父级菜单：</label>
            <div class="formControls col-5">
                <span class="select-box">
                <select class="select Validform_error" size="1" name="menu_id" datatype="*" nullmsg="请选择">
                    <option value="" selected="" disabled="disabled">请选择</option>
                    <option value="0" <if condition="$data['menu_id'] eq 0"> selected</if>>顶级菜单</option>
                    <volist name=":getMenuTree()" id="v">
                        <option value="{$v.id}" <if condition="$v['id'] eq $data['menu_id']"> selected</if><if condition="$v['menu_id'] neq 0">disabled="disabled"</if>>{$v.title}</option>
                    </volist>
                </select>
                </span>
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red">*</span>菜单名：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="title" datatype="*" nullmsg="不能为空" value="{$data.title}">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red"></span>描述：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="content" value="{$data.content}">
            </div>
            <div class="col-4"></div>
        </div>
        <if condition="$data['menu_id'] neq 0">
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red">*</span>链接：</label>
                <div class="formControls col-5">
                    <input type="text" class="input-text" placeholder="请输入" name="link" datatype="*" nullmsg="不能为空" value="{$data.link}">
                </div>
                <div class="col-4"></div>
            </div>
        </if>
        <if condition="$data['menu_id'] eq 0">
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red"></span>图标代码：</label>
                <div class="formControls col-5">
                    <input type="text" class="input-text" placeholder="请输入" name="icon" value="{$data.icon}">
                </div>
                <div class="col-4"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-3"><span class="c-red"></span>控制器名：</label>
                <div class="formControls col-5">
                    <input type="text" class="input-text" placeholder="请输入" name="alias">
                </div>
                <div class="col-4"></div>
            </div>
        </if>
        <div class="row cl">
            <label class="form-label col-3"><span class="c-red"></span>排序：</label>
            <div class="formControls col-5">
                <input type="text" class="input-text" placeholder="请输入" name="sort" value="{$data.sort}">
            </div>
            <div class="col-4"></div>
        </div>
        <div class="row cl">
            <div class="col-9 col-offset-3">
                <input class="btn btn-primary radius" type="submit" value="提交">
            </div>
        </div>
    </form>
</div>
<include file="Common:footer_include"/>

</body>
</html>